home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
biz
/
dbase
/
db.lha
/
Examples
/
ARexxDemos
/
playcdsong.db
< prev
next >
Wrap
Text File
|
1994-11-20
|
2KB
|
86 lines
/* Rexxprogram for db that plays your favorite track on the CD you select.
*
* It needs a running InfraRexxDaemon to work properly.
*
* Anders Callertun 1994
* 1994-11-13 First version
* 1994-11-15 Added some error messages.
* 1994-11-19 Made an English/Swedish version.
*/
options results
lang = GetLang()
if ~show(p,infrarexx) then do
interpret OKAY1 sourceline(lang+1)
exit
end
GETFIELD 'group'
group = result
GETFIELD 'title'
title = result
GETFIELD 'number'
number = result
current_cd = '"'title'"' sourceline(lang+4) group
if getclip('current_cd')=='' then do
interpret OKAY2 sourceline(lang+2)
if result = 1 then do
call setclip('current_cd',current_cd)
end
else call setclip('current_cd',sourceline(lang+5))
end
if getclip('current_cd') ~= current_cd then do
address infrarexx 'CD_OPEN_CLOSE'
interpret OKAY2 sourceline(lang+3)
if result = 0 then exit
end
call setclip('current_cd',current_cd)
do while number>10 /* This is how you select a track > 10 */
address infrarexx 'CD_PLUS_10' /* on a CD player from JVC. */
number = number-10 /* You may have to change this */
end /* for your CD player. */
address infrarexx 'CD_'number
address infrarexx 'CD_PLAY' /* Really not needed by JVC. */
exit
GetLang:
if open(lang_file,'ENV:language',r) then do
language = readln(lang_file)
call close(lang_file)
select
when language = 'svenska' then return sourceline()-2*6
/* If you add your own language, you must also add another when-statement like this:
when language = '<language>' then return sourceline()-3*6
*/ otherwise ;
end
end
return sourceline()-1*6
end
/*
Here you may insert your own language. If you do, please send me a uuencoded copy
of your file to d91-aca@nada.kth.se, so I can include it in the next release of db.
'InfraRexxDaemon körs inte!'||'0a0a'x || 'Om du inte vet vad InfraRexx är, läs filen'||'a'x || '"About the examples" för att få reda på mer.'
'Har du'||'a'x || current_cd || 'a'x 'i din CD spelare nu?'
'Byt ut' || 'a'x || getclip('current_cd') || 'a'x || 'mot' || 'a'x || current_cd'!'
av
den okända CDn
'The InfraRexxDaemon is not running!'||'0a0a'x || 'If you don''t know what InfraRexx is, please read the file'||'a'x ||'"About the examples" to find out more.'
'Do you have'||'a'x || current_cd || 'a'x 'in your CD player now?'
'Please replace' || 'a'x || getclip('current_cd') || 'a'x || 'with' || 'a'x || current_cd'!'
by
the unknown CD
*/